<?php
/**
 * @author		João Batista Neto
 * @package		rpo
 * @subpackage	http\interfaces
 * @category	Http, Client
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 */
namespace rpo\http\interfaces;

use rpo\http\interfaces\IHttpConnection;

/**
 * Define a interface para um estado HTTP
 * @author		João Batista Neto
 * @package		rpo
 * @subpackage	http\interfaces
 * @category	Http, Client
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 */
interface IHttpState {
	/**
	 * Muda o estado da conexão
	 * @param IHttpConnection $connection
	 */
	public function changeState( IHttpConnection $connection );

	/**
	 * Fecha a conexão
	 * @param IHttpConnection $connection
	 */
	public function close( IHttpConnection $connection );

	/**
	 * Carrega dados
	 * @param IHttpConnection $connection
	 */
	public function load( IHttpConnection $connection );

	/**
	 * Abre a conexão
	 * @param IHttpConnection $connection
	 */
	public function open( IHttpConnection $connection );

	/**
	 * Envia dados
	 * @param IHttpConnection $connection
	 */
	public function send( IHttpConnection $connection );
}